﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;
using System.Windows.Shapes;

namespace SnowLotus.Canvas
{
    public class SL2Polygon
    {

        private Polygon mpolygon;
        public SL2Polygon(Brush brushes=null,double thickness=1)
        {
            mpolygon = new Polygon
            {
                Stroke = ((brushes == null) ? Brushes.Black : brushes),
                StrokeThickness = thickness,
                Fill = Brushes.LightBlue
            };
            Manager.AddShape(mpolygon);
        }

        public void addPoint(double x, double y)
        {
            mpolygon.Points.Add(new System.Windows.Point(x, y));
        }
    }
}
